package top.zk123.chain.mapper;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import top.zk123.chain.bean.Revoke;

import java.util.List;

public interface RevokeMapper extends JpaRepository<Revoke, String> {

    // 通过 userId 查询撤销记录
    @Query(value = "select * from revoke_certs where user_id = :userId", nativeQuery = true)
    List<Revoke> findByUserId(String userId);
}
